package com.hecate.user.webapi.controller;

import com.hecate.common.response.HecateResponse;
import com.hecate.user.webapi.annotation.ResponseResult;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 黄星星
 * @date 2020-12-07
 */
@RestController
@RequestMapping("/test")
public class OkController {

    @GetMapping("/ok/1")
    @ResponseResult
    public String ok1(){
        return "多多岛";
    }

    @GetMapping("/ok/2")
    public HecateResponse<String> ok2(){
        HecateResponse hecateResponse = HecateResponse.SUCCESS("ok2");
        hecateResponse.setMessage("ok2成功了!");
        return hecateResponse;
    }
}
